﻿using System;
using System.ServiceModel;
using CC.Yacht.Messages;

namespace CC.Yacht.Interfaces
{
    [ServiceContract(CallbackContract = typeof(IYachtServiceCallback))]
    public interface IYachtService
    {
        [OperationContract(IsOneWay = true)]
        void CreateGame(Guid sessionId, Guid lobbyId);

        [OperationContract(IsOneWay = true)]
        void JoinGame(Guid sessionId, Guid gameId);

        [OperationContract(IsOneWay = true)]
        void JoinLobby(Guid sessionId, Guid lobbyId);

        [OperationContract(IsOneWay = true)]
        void LeaveGame(Guid sessionId, Guid gameId);

        [OperationContract(IsOneWay = true)]
        void LeaveLobby(Guid sessionId, Guid lobbyId);

        [OperationContract]
        LoginResponse Login(string email, string password);

        [OperationContract(IsOneWay = true)]
        void Logout(Guid sessionId);

        [OperationContract]
        bool Ping();

        [OperationContract]
        BaseResponse Register(string email, string username, string password);

        [OperationContract(IsOneWay = true)]
        void Roll(Guid sessionId, Guid gameId);

        [OperationContract(IsOneWay = true)]
        void SendMessage(Guid sessionId, Target target, Guid targetId, string message);

        [OperationContract(IsOneWay = true)]
        void SetScoreField(Guid sessionId, Guid gameId, ScoreField scoreField);

        [OperationContract(IsOneWay = true)]
        void StartGame(Guid sessionId, Guid gameId);

        [OperationContract(IsOneWay = true)]
        void UpdateDice(Guid sessionId, Guid gameId, Dice dice);
    }
}
